Pattern Matching in Order-Sorted Languages

نویسنده

  • Delia Kesner
چکیده

We study the problem of pattern matching in order-sorted languages whose evaluation strategy is lazy. We propose an extension of the Puel-Suárez compilation scheme to function definitions via order-sorted patterns. Basically, a list of ordered and possibly ambiguous linear patterns is transformed into a set of disjoint order-sorted constrained terms. This set is in turn transformed according to some normalization rules in order to build a pattern matching tree (PMT). Variables of order-sorted constrained terms now have not only structure, but also subsort constraints. Accordingly, discrimination trees are defined to have edges labeled with either structure or subsort constraints. Due to this latter kind of edge, we are not always forced to reduce terms to normal forms during the pattern matching process, taking advantage in this way of the lazy reduction scheme. For example, suppose is a sort greater than , the variable x is a pattern and t is a term of sort to be matched. If t reduces to a term whose sort is a subsort of , it is already decidable that the term obtained matches x , even if it is not in normal form. We show that the PMT is optimal if a decidable property of sequentiality holds for the sets generated during the compilation process. Our method turns out to be applicable for strict languages as well.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Entailment and Disentailment of Order-sorted Feature Constraints (summary)

LIFE uses matching on order-sorted feature structures for passing arguments to functions. As opposed to uniication which amounts to normalizing a conjunction of constraints, solving a matching problem consists of deciding whether a constraint (guard) or its negation are entailed by the context. We give a complete and consistent set of rules for entailment and disentailment of order-sorted featu...

متن کامل

Entailment and Disentailment of Order-Sorted Feature Constraints

LIFE uses matching on order-sorted feature structures for passing arguments to functions. As opposed to uni cation which amounts to normalizing a conjunction of constraints, solving a matching problem consists of deciding whether a constraint (guard) or its negation are entailed by the context. We give a complete and consistent set of rules for entailment and disentailment of order-sorted featu...

متن کامل

Space Efficient Linear Time Construction of Suffix Arrays

We present a linear time algorithm to sort all the suffixes of a string over a large alphabet of integers. The sorted order of suffixes of a string is also called suffix array, a data structure introduced by Manber and Myers that has numerous applications in pattern matching, string processing, and computational biology. Though the suffix tree of a string can be constructed in linear time and t...

متن کامل

Automatic generation of certified construction functions guaranteeing algebraic invariants on concrete data types

Concrete data types and pattern-matching are salient features of modern programming languages as powerful ways of defining and manipulating data structures. Among other things (eg. abstract syntax trees, regular expressions, DNA sequences, chemistry, cellular automata), the developments of XML greatly increases the interest in more complex pattern-matching for easily writing programs transformi...

متن کامل

Matching Scores of System Relevance and User-Oriented Relevance in SID, ISC and Google Scholar

Background and Aim: The main aim of Information storage and retrieval systems is keeping and retrieving the related information means providing the related documents with users’ needs or requests. This study aimed to answer this question that how much are the system relevance and User- Oriented relevance are matched in SID, SCI and Google Scholar databases. Method: In this study 15 keywords of ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1991